var strFullPath=window.document.location.href;
var strPath=window.document.location.pathname;
var pos=strFullPath.indexOf(strPath);
var prePath=strFullPath.substring(0,pos);
var project = window.location.pathname.split("/")[1];
var url = prePath+"/"+project+"/TeacherController/changeStudentClass.wm";
$(function () {
    $("#toptitle").html("班级学生列表");
    $("#table9_demo1 .table").floatThead({
        scrollContainer: function($table){
            return $table.closest('.wrapper');
        }
    });
    $(".king-btn-demo ").click(function () {
        window.history.back(-1);
    });
   $(".remove").click(function () {
       if(confirm("一旦移除将无法还原，确定移除吗？")){
           var studentId = $(this).parent().prev().prev().prev().prev().prev().text();
           var class_id = $("#hidden"+studentId).val();
           $.post(url,{class_id:class_id,
               studentId:studentId},function (result) {
               if(result.msg=="yes"){
                   alert("移除成功！")
                   $("#tr"+studentId).remove();
               }else{
                   alert("系统错误！移除失败！");
               }
           },"json")
       }
    
   });
});